//
// Created by zggua on 2025/7/16.
//

#ifndef PINGTOOLS_H
#define PINGTOOLS_H
#include <QObject>


class PingTools : QObject {
    Q_OBJECT

public:
    explicit PingTools(QObject *parent = nullptr);

    ~PingTools() override;

    /**
     * @brief ping 检查网络是否正常
     * @param ip 要检查的ip
     * @param timeout 超时时间
     * @return
     */
    static bool Ping(const QString &ip, int timeout = 1000);
};


#endif //PINGTOOLS_H
